package com.fie.calculations;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
 * MaxProfitCalculator.java
 *
 * Created on January 13, 2008, 5:47 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

/**
 *
 * @author joseacuna-rohter
 */
public class OptionsProfits {
    
    static double priceOfOption;
    static double strikePrice;
    static double stockPrice;
    static double total;
    static int numberOfOptions;
    
    /** Creates a new instance of MaxProfitCalculator */
    public OptionsProfits(double priceOfOption,double strikePrice,
                double stockPrice,int numberOfOptions) {
        
        this.priceOfOption = priceOfOption;
        this.strikePrice = strikePrice;
        this.stockPrice = stockPrice;
        this.numberOfOptions = numberOfOptions;
        
    }
    
    

    
    public static double totalCost(){
        
        total = 0;
        
        total = ((priceOfOption * numberOfOptions) - 
                    (stockPrice * numberOfOptions)) * 100;
        
        return total;
        
    }
    
    public static double totalProfit(){
        
        total = ((strikePrice * numberOfOptions) * 100) + totalCost();
        
        return total;
        
    }
 
    
    
}
